
/*
 * @Description: 实例管理 - 接口
 * @Author: DHL
 * @Date: 2022-09-15 16:20:19
 * @LastEditors: DHL
 * @LastEditTime: 2023-11-16 17:06:14
 */

import { $get, $post, $put, $exportExcel } from '@/utils/http'
import { ContentTypeEnum } from '@/constant/http'
import {
  ActHiProcinstModel,
  ActHiProcinstParams,
  ActHiProcinstPageParams,
  ActHiProcinstPageResultModel,
  ActHiProcinstResultModel
} from './model/actHiProcinstModel'

/**
 * 分页查询
 */
export const apiActHiProcinstSearch = (searchParams: ActHiProcinstPageParams) =>
  $get<ActHiProcinstPageResultModel>({
    url: '/actHiProcinst/search',
    params: searchParams
  })

/**
 * 根据ID获取详情
 */
export const apiActHiProcinstGetById = (id: string) =>
  $get<ActHiProcinstResultModel>({
    url: '/actHiProcinst/getById',
    params: { id: id }
  })

/**
 * 保存信息
 */
export const apiActHiProcinstSave = (saveParams: ActHiProcinstModel) =>
  $post<ActHiProcinstResultModel>({
    url: '/actHiProcinst/save',
    contentType: ContentTypeEnum.json,
    params: saveParams
  })

/**
 * 更新信息
 */
export const apiActHiProcinstUpdateById = (updateParams: ActHiProcinstModel) =>
  $put<ActHiProcinstResultModel>({
    url: '/actHiProcinst/updateById',
    contentType: ContentTypeEnum.json,
    params: updateParams
  })

/**
 * 批量删除信息
 */
export const apiActHiProcinstBatchDeleteByIds = (ids: string) =>
  $post<ActHiProcinstResultModel>({
    url: '/actHiProcinst/batchDeleteByIds',
    params: { ids: ids }
  })


/**
 * 导出
 */
 export const apiActHiProcinstExport = (searchParams: ActHiProcinstParams, fileName: string) =>
  $exportExcel<ActHiProcinstResultModel>(
    {
      url: '/actHiProcinst/exportExcel',
      params: searchParams
    },
    fileName
  )
